home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2531 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  975 b 

  1. Path: sysadmin.sequel.net!newsman
  2. From: Alex Ibrado <trolloc@cyber.cyb-live.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Reading large files
  5. Date: Mon, 22 Jan 1996 14:37:25 -0800
  6. Organization: CyberNET Live!
  7. Message-ID: <310411A5.3438@cyber.cyb-live.com>
  8. NNTP-Posting-Host: cyber.cyb-live.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b5 (Win16; I)
  13.  
  14. Hello! I have a friend who wants to read in a file of 1,000,000 doubles
  15. into memory. (She's using Borland C++ 4.0/Windows.) The question is:
  16. can it be done using a single fread? Since the algo requires reading in
  17. the values several times (with a different offset each time), I
  18. suggested using fseek instead of reading the whole file. However, with
  19. 1,000,000 points read several times, this could be slow. sizeof(size_t)
  20. returns 2; does this mean she could only read in 65535 doubles at a
  21. given time?
  22.  
  23. Would really appreciate any help you could extend. Thanks!
  24.